package com.stwyj.sbd.dao.repository;

import com.stwyj.sbd.dao.repository.custom.UserRepositoryCustom;
import com.stwyj.sbd.entity.domain.UserCollection;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.Date;

/**
 *<p>
 * user collection 自定义crud等接口repository
 *</p>
 *
 * @author stwyj
 * @since 2018/12/3
 */
public interface UserRepository extends MongoRepository<UserCollection, String>, UserRepositoryCustom {

    /**
     * 查询创建时间在startDate之后的所有数据(分页)
     * @param startDate 开始时间
     * @param pageable 分页参数
     * @return user信息集合
     */
    public Page<UserCollection> findByCreateDateAfter(Date startDate, Pageable pageable);
}
